package pojo.entity;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;

public class User implements Serializable {
    private int id;
    private String username;
    private Boolean ok;
    private String sex;
    private Date birthday;
    private Float salary;
    private Integer[] arrInt;
    private String[] arrStr;

    public User() {
    }

    public User(int id, String username, Boolean ok, String sex, Date birthday, Float salary) {
        this.id = id;
        this.username = username;
        this.ok = ok;
        this.sex = sex;
        this.birthday = birthday;
        this.salary = salary;
    }


    /**
     * 获取
     * @return id
     */
    public int getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * 获取
     * @return username
     */
    public String getUsername() {
        return username;
    }

    /**
     * 设置
     * @param username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 获取
     * @return ok
     */
    public Boolean getOk() {
        return ok;
    }

    /**
     * 设置
     * @param ok
     */
    public void setOk(Boolean ok) {
        this.ok = ok;
    }

    /**
     * 获取
     * @return sex
     */
    public String getSex() {
        return sex;
    }

    /**
     * 设置
     * @param sex
     */
    public void setSex(String sex) {
        this.sex = sex;
    }

    /**
     * 获取
     * @return birthday
     */
    public Date getBirthday() {
        return birthday;
    }

    /**
     * 设置
     * @param birthday
     */
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    /**
     * 获取
     * @return salary
     */
    public Float getSalary() {
        return salary;
    }

    /**
     * 设置
     * @param salary
     */
    public void setSalary(Float salary) {
        this.salary = salary;
    }



    /**
     * 设置
     * @param arrInt
     */
    public void setArrInt(String[] arrInt) {
        this.arrInt= new Integer[arrInt.length];
        for (int i = 0; i < arrInt.length; i++) {
            this.arrInt[i]= Integer.valueOf(arrInt[i]);
        }
    }


    /**
     * 设置
     * @param arrStr
     */
    public void setArrStr(String[] arrStr) {
        this.arrStr= arrStr;
    }

    public String toString() {
        return "User{id = " + id + ", username = " + username + ", ok = " + ok + ", sex = " + sex + ", birthday = " + birthday + ", salary = " + salary + ", arrInt = " + Arrays.toString(arrInt) + ", arrStr = " + Arrays.toString(arrStr) + "}";
    }
}
